const _LOG_LEVEL_ERROR   = 'error';
const _LOG_LEVEL_WARNING = 'warn';
const _LOG_LEVEL_INFO    = 'info';
const _LOG_LEVEL_DEBUG   = 'debug';

module.exports = {

    REDIS:{
        host: '127.0.0.1',
        port: 6379,
        options:{
            db:0,
            auth_pass:''
        }
    },

    LOG:{
        level:_LOG_LEVEL_DEBUG,
        _LOG_LEVEL_ERROR:_LOG_LEVEL_ERROR,
        _LOG_LEVEL_WARNING:_LOG_LEVEL_WARNING,
        _LOG_LEVEL_INFO:_LOG_LEVEL_INFO,
        _LOG_LEVEL_DEBUG:_LOG_LEVEL_DEBUG,
        _OUT_PATH:__dirname + '/logs/'
    },

    COOKIE:{
        CACHE_KEY:'MERCHANT_WORDS'
    },

    PROXY:{
        host:'127.0.0.1',
        port:7890,
        need:false
    },

    PARSER:{
        BASE_PATH:'../crawler/core/parser/'
    },


    DATASOURCE:{
        host:'139.155.177.23',
        user:'root',
        password:'D97ZRAdgGdcU',
        database:'xvideo',
        port:3306
    },


    CRAWLER:{
        //魔词
        MERCHANT_WORDS:{
            //关键字搜索
            CS_SEARCH_KEYWORD:{
                URL:'https://www.merchantwords.com/{{searchUrl}}',
                TYPE:'merchantwords_cs',
                METHOD:'GET',
                NAME:'CS_SEARCH_KEYWORD'
            },
            //关键字详情搜索
            CS_DETAIL_KEYWORD:{
                URL:'https://www.merchantwords.com/api/keyword-search-detail',
                TYPE:'merchantwords_cs',
                METHOD:'POST',
                body:{},
                NAME:'CS_DETAIL_KEYWORD'
            },
            //ET列表搜索
            ET_SEARCH:{
                URL:'https://www.merchantwords.com/{{searchUrl}}',
                TYPE:'merchantwords_et',
                METHOD:'GET',
                NAME:'ET_SEARCH'
            },
            //ET关键字搜索
            ET_KEYWORD_SEARCH:{
                URL:'https://www.merchantwords.com/{{searchUrl}}',
                TYPE:'merchantwords_cs',
                METHOD:'GET',
                NAME:'ET_KEYWORD_SEARCH'
            },
            //P1列表搜索
            P1_SEARCH:{
                URL:'https://www.merchantwords.com/{{searchUrl}}',
                TYPE:'merchantwords_p1',
                METHOD:'GET',
                NAME:'P1_SEARCH'
            },
            //A+搜索
            A_PLUSH_SEARCH:{
                URL:'https://www.merchantwords.com/{{searchUrl}}',
                TYPE:'merchantwords_a_plush',
                METHOD:'GET',
                NAME:'A_PLUSH_SEARCH'
            }
        }
    },

    REQUEST:{
        TIME_OUT:10000
    }
};
